package com.bondar.task5;

public class Account {
	private int balance;

	public Account(int amount) {
		this.balance = amount;
	}

	public int getBalance() {
		return balance;
	}

	public boolean withdraw(int amount) {
		if (balance >= amount) {
			this.balance = balance - amount;
			return true;
		} else {
//			System.err.println("Insufficient funds");
			return false;
		}
	}

	public void deposit(int amount) {
		this.balance += amount;
	}

}
